﻿ 
//
// *************************************************************************************
// WP-Framework
// 
// Developed by
// Lukas Kretschmar (lkretschmar.dev@bluewin.ch)
//
// Switzerland, Copyright (c) 2013 lkretschmar
// This content is released under the MIT License (http://opensource.org/licenses/MIT).
//     
// *************************************************************************************
//
//
// ***********************************************************************************************************************************
// NOTICE!!
// This content is auto-generated. Any changes will be overriden the next time the template is changed or the custom-tool is executed.
// Generated at: 14.04.2013 22:19
//
// ***********************************************************************************************************************************

using System;
using System.Reflection;
using KretschIT.WP_Fx.EasyMoq;
using KretschIT.WP_Fx.EasyMoq.Generator;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Objects;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.OtherObjects;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Events;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Inheritance;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Async;
using System;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Objects.Custom;
using System.Collections.Generic;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Other;
using KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Events.EventArgs;
using System.Threading.Tasks;

namespace KretschIT.WP_Fx.EasyMoq.Generator.Tests
{
	#region Registration

	[EasyMoqRegistration]
	public sealed class EasyMoqInit : IEasyMoqRegistration
	{
		public void Register(IMockFactoryRegistration factory)
		{
			factory.Register<ITestObject, TestObjectMockable>(() => new TestObjectMockable());
			factory.Register<ITestGenericMethod, TestGenericMethodMockable>(() => new TestGenericMethodMockable());
			factory.Register<KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Objects.ITestSimpleGenericObject<String>, TestSimpleGenericObject1Mockable<String>>(() => new TestSimpleGenericObject1Mockable<String>());  
			factory.Register<KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Objects.ITestSimpleGenericObject<IObject>, TestSimpleGenericObject1Mockable<IObject>>(() => new TestSimpleGenericObject1Mockable<IObject>());  
			factory.Register<KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.OtherObjects.ITestSimpleGenericObject<String>, TestSimpleGenericObject1_1_Mockable<String>>(() => new TestSimpleGenericObject1_1_Mockable<String>());  
			factory.Register<ITestComplexGenericObject<Int32, String, Int64>, TestComplexGenericObject3Mockable<Int32, String, Int64>>(() => new TestComplexGenericObject3Mockable<Int32, String, Int64>());  
			factory.Register<ITestComplexGenericObject<Int16, String, String>, TestComplexGenericObject3Mockable<Int16, String, String>>(() => new TestComplexGenericObject3Mockable<Int16, String, String>());  
			factory.Register<ITestComplexGenericObject<Int32, Int32, Int32>, TestComplexGenericObject3Mockable<Int32, Int32, Int32>>(() => new TestComplexGenericObject3Mockable<Int32, Int32, Int32>());  
			factory.Register<ITestAllEvent, TestAllEventMockable>(() => new TestAllEventMockable());
			factory.Register<ITop, TopMockable>(() => new TopMockable());
			factory.Register<ITopOverload, TopOverloadMockable>(() => new TopOverloadMockable());
			factory.Register<ISetter, SetterMockable>(() => new SetterMockable());
			factory.Register<IOnlySetter<Boolean>, OnlySetter1Mockable<Boolean>>(() => new OnlySetter1Mockable<Boolean>());  
			factory.Register<ITestAsyncFunc, TestAsyncFuncMockable>(() => new TestAsyncFuncMockable());
        }
	}

	#endregion

	#region TestObjectMockable

	class TestObjectMockable : Mockable<ITestObject>, ITestObject
	{
		#region Events

 
		#endregion

		#region Methods

		public void Action()
		{
			this.Handler.Call(m => m.Action());
		}

		public void Action(String arg)
		{
			this.Handler.Call(m => m.Action(arg));
		}

		public void Action(String first, String second)
		{
			this.Handler.Call(m => m.Action(first, second));
		}

		public void Action(Char first, Char second)
		{
			this.Handler.Call(m => m.Action(first, second));
		}

		public Boolean Func()
		{
			return this.Handler.Call(m => m.Func());
		}

		public Boolean Func(String arg)
		{
			return this.Handler.Call(m => m.Func(arg));
		}

		public Boolean Func(String first, String second)
		{
			return this.Handler.Call(m => m.Func(first, second));
		}

		public IOtherNamespaceObject Do(IOtherNamespaceObject obj)
		{
			return this.Handler.Call(m => m.Do(obj));
		}

 
		#endregion

		#region Properties

		private const string PropertyPropertyName = "Property";

		public String Property
		{
			get { return this.Handler.Get(m => m.Property); }
			set { this.Handler.Set(m => m.Property, value); }
		}

		private const string OtherPropertyPropertyName = "OtherProperty";

		public String OtherProperty
		{
			get { return this.Handler.Get(m => m.OtherProperty); }
		}

		#endregion
	}
	
	#endregion

	#region TestGenericMethodMockable

	class TestGenericMethodMockable : Mockable<ITestGenericMethod>, ITestGenericMethod
	{
		#region Events

 
		#endregion

		#region Methods

		public void NonGeneric()
		{
			this.Handler.Call(m => m.NonGeneric());
		}

		public T GenericReturn<T>()
		{
			return this.Handler.Call(m => m.GenericReturn<T>());
		}

		public void GenericArgument<T>(T arg)
		{
			this.Handler.Call(m => m.GenericArgument<T>(arg));
		}

		public void MultiGenericArgument<T1, T2>(T1 arg1, T2 arg2)
		{
			this.Handler.Call(m => m.MultiGenericArgument<T1, T2>(arg1, arg2));
		}

		public void MixedArguments<T1>(Int32 i, T1 arg1, String s)
		{
			this.Handler.Call(m => m.MixedArguments<T1>(i, arg1, s));
		}

		public void GenericParameter<T>(System.Collections.Generic.IEnumerable<T> args)
		{
			this.Handler.Call(m => m.GenericParameter<T>(args));
		}

		public void GenericConstraintAction<T>() where T : class, new()
		{
			this.Handler.Call(m => m.GenericConstraintAction<T>());
		}

 
		#endregion

		#region Properties

		#endregion
	}
	
	#endregion

	#region TestSimpleGenericObject1Mockable

	class TestSimpleGenericObject1Mockable<T> : Mockable<KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Objects.ITestSimpleGenericObject<T>>, KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.Objects.ITestSimpleGenericObject<T>
	{
		#region Events

 
		#endregion

		#region Methods

		public T Do(T arg)
		{
			return this.Handler.Call(m => m.Do(arg));
		}

 
		#endregion

		#region Properties

		#endregion
	}
	
	#endregion

	#region TestSimpleGenericObject1_1_Mockable

	class TestSimpleGenericObject1_1_Mockable<T> : Mockable<KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.OtherObjects.ITestSimpleGenericObject<T>>, KretschIT.WP_Fx.EasyMoq.Generator.Tests.Helpers.OtherObjects.ITestSimpleGenericObject<T>
	{
		#region Events

 
		#endregion

		#region Methods

 
		#endregion

		#region Properties

		#endregion
	}
	
	#endregion

	#region TestComplexGenericObject3Mockable

	class TestComplexGenericObject3Mockable<T1, T2, T3> : Mockable<ITestComplexGenericObject<T1, T2, T3>>, ITestComplexGenericObject<T1, T2, T3> where T1 : struct
	{
		#region Events

 
		#endregion

		#region Methods

		public T1 Do()
		{
			return this.Handler.Call(m => m.Do());
		}

		public System.Collections.Generic.IEnumerable<T2> LoadItems()
		{
			return this.Handler.Call(m => m.LoadItems());
		}

 
		#endregion

		#region Properties

		private const string ItemsPropertyName = "Items";

		public System.Collections.Generic.IEnumerable<T3> Items
		{
			get { return this.Handler.Get(m => m.Items); }
		}

		#endregion
	}
	
	#endregion

	#region TestAllEventMockable

	class TestAllEventMockable : Mockable<ITestAllEvent>, ITestAllEvent
	{
		#region Events

 
		public event EventHandler SimpleEvent;

		public void RaiseSimpleEventEvent(Object sender, EventArgs e)
		{
			if(this.SimpleEvent != null)
			{
				this.SimpleEvent(sender, e);
			}
		}

 
		public event EventHandler<EventArgs> GenericEvent;

		public void RaiseGenericEventEvent(Object sender, EventArgs e)
		{
			if(this.GenericEvent != null)
			{
				this.GenericEvent(sender, e);
			}
		}

 
		public event CustomEventHandler<MyEventArgs, EventArgs> CustomEvent;

		public void RaiseCustomEventEvent(MyEventArgs arg1, EventArgs arg2)
		{
			if(this.CustomEvent != null)
			{
				this.CustomEvent(arg1, arg2);
			}
		}

 
		#endregion

		#region Methods

 
		#endregion

		#region Properties

		#endregion
	}
	
	#endregion

	#region TopMockable

	class TopMockable : Mockable<ITop>, ITop
	{
		#region Events

 
		public event EventHandler BaseEvent;

		public void RaiseBaseEventEvent(Object sender, EventArgs e)
		{
			if(this.BaseEvent != null)
			{
				this.BaseEvent(sender, e);
			}
		}

 
		public event EventHandler TestEvent;

		public void RaiseTestEventEvent(Object sender, EventArgs e)
		{
			if(this.TestEvent != null)
			{
				this.TestEvent(sender, e);
			}
		}

 
		#endregion

		#region Methods

		public Int32 Process(Int32 item)
		{
			return this.Handler.Call(m => m.Process(item));
		}

		public void Do()
		{
			this.Handler.Call(m => m.Do());
		}

 
		#endregion

		#region Properties

		private const string LabelPropertyName = "Label";

		public String Label
		{
			get { return this.Handler.Get(m => m.Label); }
		}

		private const string ValuePropertyName = "Value";

		public Int32 Value
		{
			get { return this.Handler.Get(m => m.Value); }
			set { this.Handler.Set(m => m.Value, value); }
		}

		#endregion
	}
	
	#endregion

	#region TopOverloadMockable

	class TopOverloadMockable : Mockable<ITopOverload>, ITopOverload
	{
		#region Events

 
		public event EventHandler AnEvent;

		public void RaiseAnEventEvent(Object sender, EventArgs e)
		{
			if(this.AnEvent != null)
			{
				this.AnEvent(sender, e);
			}
		}

 
		#endregion

		#region Methods

		public void AMethod()
		{
			this.Handler.Call(m => m.AMethod());
		}

 
		#endregion

		#region Properties

		private const string ValuePropertyName = "Value";

		public Int32 Value
		{
			get { return this.Handler.Get(m => m.Value); }
			set { this.Handler.Set(m => m.Value, value); }
		}

		#endregion
	}
	
	#endregion

	#region SetterMockable

	class SetterMockable : Mockable<ISetter>, ISetter
	{
		#region Events

 
		#endregion

		#region Methods

 
		#endregion

		#region Properties

		private const string ValuePropertyName = "Value";

		public Int32 Value
		{
			set { this.Handler.Set(m => m.Property(ValuePropertyName), value); }
		}

		Int32 IGetter.Value
		{
			get { return this.Handler.Get(m => ((IGetter)m).Value); }
		}

		#endregion
	}
	
	#endregion

	#region OnlySetter1Mockable

	class OnlySetter1Mockable<T> : Mockable<IOnlySetter<T>>, IOnlySetter<T>
	{
		#region Events

 
		#endregion

		#region Methods

 
		#endregion

		#region Properties

		private const string ValuePropertyName = "Value";

		public T Value
		{
			set { this.Handler.Set(m => m.Property(ValuePropertyName), value); }
		}

		#endregion
	}
	
	#endregion

	#region TestAsyncFuncMockable

	class TestAsyncFuncMockable : Mockable<ITestAsyncFunc>, ITestAsyncFunc
	{
		#region Events

 
		#endregion

		#region Methods

		public Task<Int32> Calc()
		{
			return this.Handler.Call(m => m.Calc());
		}

 
		#endregion

		#region Properties

		#endregion
	}
	
	#endregion

}

 

